/**
 * 
 */
package com.igatewebsol.action;

import java.util.ArrayList;

import com.igatewebsol.actionforms.HotelUserBean;
import com.igatewebsol.service.UserService;
import com.opensymphony.xwork2.ActionSupport;



/**
 * @author Aravind Rapuru
 *
 */
public class UserAction extends ActionSupport {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private HotelUserBean hUserBean=new HotelUserBean();
	private UserService userService=new UserService();
	private ArrayList<UserTypeBean> userTypeList=new ArrayList<UserTypeBean>();
	
	public String loginValidate(){
		
		return SUCCESS;
	}
	
	public String populateUser(){
		try {
			UserTypeBean uTypeBean=new UserTypeBean();
			uTypeBean.setUserTypeId("AD");
			uTypeBean.setUserTypeId("ADMIN");
			UserTypeBean uTypeBean2=new UserTypeBean();
			uTypeBean2.setUserTypeId("AD");
			uTypeBean2.setUserTypeId("ADMIN");
			
			//userTypeList=userService.userTypeList();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return SUCCESS;
	}
	
     public String createUser(){
		
		try {
			int insertcount=userService.createUser(hUserBean);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return SUCCESS;
	}

	public HotelUserBean getHUserBean() {
		return hUserBean;
	}

	public void setHUserBean(HotelUserBean userBean) {
		hUserBean = userBean;
	}

	public UserService getUserService() {
		return userService;
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	public ArrayList<UserTypeBean> getUserTypeList() {
		return userTypeList;
	}

	public void setUserTypeList(ArrayList<UserTypeBean> userTypeList) {
		this.userTypeList = userTypeList;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

}
